<template>
  <div class="hello">
    <button @click="aceEditBtn">编辑</button>
    <aceComp :aceVisible="aceEdit" :editContent="aceObj"></aceComp>
  </div>
</template>

<script>
import aceComp from "@/components/editCompont";
const a={
  id:1,
  data:`{
  status: 'OK',
  'datas|1-2': [{
    iaUserId: 5,
    kindId: 16,
    'liveType|1-2': 1,
    liveStatus: 1,
    liveTopic: '1207视频测试2test17',
    'noticeFlag|0-1': 0,
    liveStartTime: '2017-12-16 16:00:00',
    liveEndTime: '2017-12-16 16:30:00',
    liveTags: '大盘解析',
    liveDesc: '1207视频测试2',
    likeNums: 0,
    livePic1: '@image',
    livePic2: '@image',
    'reserveFlag|1-3': 1,
    'reserveStatus|1-2': 1,
    reserveLimitNums: 0,
    reserveNums: 0,
    docExist: 0,
    topSort: 99,
    validStatus: 0,
    createTime: '2017-12-07 13:33:57',
    investAdviserName: '邱航宇',
    investAdviserJob: '投顾顾问',
    investAdviserTags: '基本面分析,观点标签1',
    investAdviserPic: 'http://118.178.247.199:9901/home/weblogic/data/app/T_ADVISOR_PU/23.jpg',
    investAdviserDesc: '温州车站大道证券营业部的投顾顾问',
    investAdviserDept: '温州车站大道营业部',
    kindName: '早间看市',
    riskLevel: '5',
    //观看人数
    'onlineNums|+25': 100,
    'id|+1': 20,
    //1-已预约、2-未预约 ,
    'appointStatus|1-2': 1,
    //是否收费
    chargeFlag: true
  }],
  page: {
    hasNextPage: true
  }
}`
}
export default {
  components: { aceComp },
  name: "HelloWorld",
  data() {
    return {
      aceEdit: false,
      aceObj:{}
    };
  },
  methods: {
    aceEditBtn() {
      console.log(1);
      this.aceEdit = true;
      let {id,data}=a
      this.aceObj={id,data};
    }
  }
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h1,
h2 {
  font-weight: normal;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
</style>
